ChartPalette
by Martin D. Flynn, NeXT Computer, Inc. (martin_flynn@next.com)

Overview

ChartPalette is a 3.0 loadable palette that can provide easy access to Pie charts, and Bar charts, within a user interface.  Data to be charted can be supplied by Matrix objects (forms, text fields, even sliders), Text objects, or by data point arrays supplied within your program.  For bar charts, chart types may be selected (bar, point, line, area, or a combination), axis ranges may be set, and the axis scaling may be selected (linear, or log scale), all on the inspector panel.  For pie charts, label formats and default slice colors may selected (colors can be dragged from the Color panel and dropped on a pie slice).  A chart can be connected to a Matrix of ActionCells (Buttons, etc) that will cause an action to be sent when you double-click on a bar, or pie slice.

Permission is granted to freely redistribute the ChartPalette palette and source code, and to use fragments of this code in your own applications if you find them to be useful.  The ChartPalette palette and code come with no warranty of any kind, and the user assumes all responsibility for its use.

Example

To see an example of ChartPalette, load the palette, then open the nib file 'sampleChart.nib' (on a color screen if you can).  Test run the interface with cmd-r.  This will show a variety of charting possibilities available with ChartPalette.  Try moving the sliders on the bar chart, and pie chart.  Also, try double-clicking on the bars, or pie slices, on the charts with the sliders, the corresponding button under the matching slider will be selected.  Examine the sample nib file to see how a chart is connected to a Matrix class for data input (see the window named 'DataPanel').